﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BiffenServiceLibary;
using BiffenModel;
using BiffenController.ServiceReference2;

namespace BiffenController
{
    public class PersonsController
    {
        RemoteBookingSystemClient cli;

        public PersonsController()
        {
            cli = new RemoteBookingSystemClient();
            //cli.
        }

        public void NewCustomer(string name, string lName, string street, string streetNo, int zipCode, string phoneNo, string mail, DateTime birthDate)
        {
            cli.NewCustomer(name, lName, street, streetNo, zipCode, phoneNo, mail, birthDate);
        }

        public void NewEmployee(string name, string lName, string street, string streetNo, int zipCode, string phoneNo, string mail, string password, string username)
        {
            cli.NewEmployee(name, lName, street, streetNo, zipCode, phoneNo, mail, password, username);
        }

        public void DeleteCustomer(int id)
        {
            cli.DeleteCustomer(id);
            

        }

        public void DeleteEmployee(int id)
        {
            cli.DeleteEmployee(id);
        }

        public void EditCustomer(int id, string fname, string lname, string street, string streetNo, int zipCode, string phone, DateTime birthDate, string email)
        {
            cli.EditCustomer(id, fname, lname, street, streetNo, zipCode, phone, birthDate, email);
        }

        public void EditEmployee(int id, string fname, string lname, string street, string streetNo, int zipCode, string phone, string userName, string password, string email)
        {
            cli.EditEmployee(id, fname, lname, street, streetNo, zipCode, phone, userName, password, email);
        }


        public Customer GetOneCustomer(int id)
        {
            return cli.GetOneCustomer(id);
        }

        public int GetCustomerByPhone(string phone)
        {
            return cli.GetCustomerIDByPhone(phone);
        }

        public Employee getEmployeeUserName(string userName)
        {
            return cli.GetEmployeeUserName(userName);
        }
    }
}
